﻿// -----------------------------------------------------------------------
// <copyright file="ContentProviderSubscriptionService.cs" company="Zen Design Corp">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace Zen.BlackBerry.Subscription
{
	using System;
	using Zen.BlackBerry.Subscription.Web;

	/// <summary>
	/// Implementation of the <see cref="IContentProviderSubscriptionService"/>
	/// interface.
	/// </summary>
	public class ContentProviderSubscriptionService : IContentProviderSubscriptionService
	{
		#region IContentProviderSubscriptionService Members

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's subscribe is successful.
		/// </summary>
		/// <param name="subscribeRequest">The subscribe request.</param>
		public virtual void OnSubscribeSuccess(SubscribeRequest subscribeRequest)
		{
		}

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's subscribe fails.
		/// </summary>
		/// <param name="subscribeRequest">The subscribe request.</param>
		/// <param name="exception">The exception.</param>
		public virtual void OnSubscribeFailure(SubscribeRequest subscribeRequest, Exception exception)
		{
		}

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's suspend is successful.
		/// </summary>
		/// <param name="suspendRequest">The suspend request.</param>
		public virtual void OnSuspendSuccess(SuspendRequest suspendRequest)
		{
		}

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's suspend fails.
		/// </summary>
		/// <param name="suspendRequest">The suspend request.</param>
		/// <param name="exception"></param>
		public virtual void OnSuspendFailure(SuspendRequest suspendRequest, Exception exception)
		{
		}

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's resume is successful.
		/// </summary>
		/// <param name="resumeRequest">The resume request.</param>
		public virtual void OnResumeSuccess(ResumeRequest resumeRequest)
		{
		}

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's resume fails.
		/// </summary>
		/// <param name="resumeRequest">The resume request.</param>
		/// <param name="exception"></param>
		public virtual void OnResumeFailure(ResumeRequest resumeRequest, Exception exception)
		{
		}

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's unsubscribe is successful.
		/// </summary>
		/// <param name="unsubscribeRequest">The unsubscribe request.</param>
		public virtual void OnUnsubscribeSuccess(UnsubscribeRequest unsubscribeRequest)
		{
		}

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's unsubscribe fails.
		/// </summary>
		/// <param name="unsubscribeRequest">The unsubscribe request.</param>
		/// <param name="exception"></param>
		public virtual void OnUnsubscribeFailure(UnsubscribeRequest unsubscribeRequest, Exception exception)
		{
		}

		/// <summary>
		/// Allows the content provider to perform an action when the SDK's subscribe triggers an automatic unsubscribe of a user
		/// </summary>
		/// <param name="unsubscribeRequest">The unsubscribe request.</param>
		public virtual void OnAutomaticUnsubscribe(UnsubscribeRequest unsubscribeRequest)
		{
		}

		#endregion
	}
}
